<template>
  <el-card shadow="never">
    <div slot="header">
      <el-button @click="$router.go(-1)">返回</el-button>
    </div>
    <div class="tl-center top-div mb10">
      <h1>{{ row.contentBrief }}</h1>
      <p>{{ row.issuer }} {{ formatTime(row.editorTime) }}</p>
    </div>
    <div class="content-wrap">
      <div v-html="row.content"></div>
      <ul v-if="row.cmsAttachmentVOS && row.cmsAttachmentVOS.length > 0">
        <h2>附件：</h2>
        <li v-for="(item,index) in row.cmsAttachmentVOS" :key="index">
          <a target="_blank" :href="item.savePath" v-text="item.attachmentName" />
        </li>
      </ul>
    </div>
  </el-card>
</template>

<script>
export default {
  data() {
    return {
      row: JSON.parse(this.$route.query.item)
    }
  },
  created() {
    console.log('row', this.row)
  }
}
</script>

<style scoped>
.top-div {
  width: 100%;
  background-color: #f8f8f9;
  border-bottom: 1px solid #eee;
}

.content-wrap {
  width: 900px;
  margin: 0 auto;
  /* background-color: #eee; */
  overflow: hidden;
}
</style>
